package com.wind.trademark.notice.model;
// default package

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * NoNotice entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "no_notice", catalog = "mypro")
public class NoNotice implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -7211853923847684753L;
	private Long id;
	private Long taskId;
	private String status;
	private Date executeTime;
	private String title;
	private String content;
	private Long createBy;
	private Date createTime;
	private Date lastUpdateTime;
	private Long lastUpdateBy;
	private List<NoReceiveMessage> noReceiveMessages = new ArrayList<NoReceiveMessage>(
			0);
	private List<NoReceiveMail> noReceiveMails = new ArrayList<NoReceiveMail>(0);
//	private List<NoReceiveSystem> noReceiveSystems = new ArrayList<NoReceiveSystem>(
//			0);

	// Constructors

	/** default constructor */
	public NoNotice() {
	}

	

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "TASK_ID", nullable = true)
	public Long getTaskId() {
		return this.taskId;
	}

	public void setTaskId(Long taskId) {
		this.taskId = taskId;
	}

	@Column(name = "STATUS", nullable = false, length = 10)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "EXECUTE_TIME", nullable = false, length = 19)
	public Date getExecuteTime() {
		return this.executeTime;
	}

	public void setExecuteTime(Date executeTime) {
		this.executeTime = executeTime;
	}

	@Column(name = "TITLE", nullable = false, length = 200)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT", nullable = false, length = 2000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "CREATE_BY", nullable = false,updatable=false)
	public Long getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(Long createBy) {
		this.createBy = createBy;
	}

	@Column(name = "CREATE_TIME", nullable = false, length = 19,updatable=false)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "LAST_UPDATE_TIME", nullable = false, length = 19)
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	@Column(name = "LAST_UPDATE_BY", nullable = false)
	public Long getLastUpdateBy() {
		return this.lastUpdateBy;
	}

	public void setLastUpdateBy(Long lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}

	@OneToMany(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, mappedBy = "noticeId")
	public List<NoReceiveMessage> getNoReceiveMessages() {
		return this.noReceiveMessages;
	}

	public void setNoReceiveMessages(List<NoReceiveMessage> noReceiveMessages) {
		this.noReceiveMessages = noReceiveMessages;
	}

	@OneToMany(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, mappedBy = "noticeId")
	public List<NoReceiveMail> getNoReceiveMails() {
		return this.noReceiveMails;
	}

	public void setNoReceiveMails(List<NoReceiveMail> noReceiveMails) {
		this.noReceiveMails = noReceiveMails;
	}

//	@OneToMany(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, mappedBy = "noticeId")
//	public List<NoReceiveSystem> getNoReceiveSystems() {
//		return this.noReceiveSystems;
//	}
//
//	public void setNoReceiveSystems(List<NoReceiveSystem> noReceiveSystems) {
//		this.noReceiveSystems = noReceiveSystems;
//	}

}